package com.chenxinzhi.codetools.listener

import com.intellij.openapi.module.Module
import com.intellij.openapi.project.ModuleListener
import com.intellij.openapi.project.Project
import com.intellij.util.Function
import kotlinx.coroutines.flow.MutableStateFlow

class MyModuleListener : ModuleListener {
    companion object {
        val listenerFlow = MutableStateFlow {}
    }


    override fun modulesAdded(project: Project, modules: List<Module?>) {
        listenerFlow.value()

    }

    override fun moduleRemoved(project: Project, module: Module) {
        listenerFlow.value()
    }

    override fun modulesRenamed(
        project: Project,
        modules: List<Module?>,
        oldNameProvider: Function<in Module, String?>
    ) {
        listenerFlow.value()
    }
}
